﻿<%@ Page Title="" Language="C#" MasterPageFile="~/SiteMaster.Master" AutoEventWireup="true" CodeBehind="GridViewServerPaging.aspx.cs" Inherits="SampleWeb.GridViewServerPaging" %>

<%@ Register Assembly="GenericDataSourceControl" Namespace="GenericDataSourceControl"
    TagPrefix="cc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <cc1:GenericDataSource ID="GenericDataSource1" runat="server" 
        OnExecuteSelect="GenericDataSource1_ExecuteSelect">
    </cc1:GenericDataSource>
    <h3>Read-only GridView Using GenericDataSource with Server Paging </h3>
    <asp:GridView ID="GridView1" runat="server" DataSourceID="GenericDataSource1" 
        AllowSorting="false" DataKeyNames="TaskID" Caption="My Tasks" 
        AutoGenerateColumns="False" PageSize="4" AllowPaging="true">
        <Columns>
            <asp:BoundField HeaderText="Task" DataField="Title" SortExpression="Title" />
            <asp:BoundField HeaderText="DueOn (date)" DataField="DueOn" SortExpression="DueOn" DataFormatString="{0:d}" />
            <asp:BoundField HeaderText="Description" DataField="Description" SortExpression="Description" />
            <asp:BoundField HeaderText="CreatedOn (date)" DataField="CreatedOn" SortExpression="CreatedOn" DataFormatString="{0:d}" />
            <asp:CheckBoxField HeaderText="Completed" DataField="Completed" ReadOnly="true" SortExpression="Completed" />
        </Columns>
    </asp:GridView>
</asp:Content>
